<template>
  <div class="home">
    <div class="header">
      <h1 class="title">齐大图书商城</h1>
      <div class="nav-buttons">
        <el-button type="primary" @click="goToLogin">登录</el-button>
        <el-button @click="goToRegister">注册</el-button>
        <el-button type="success" @click="goToCenter">个人中心</el-button>
      </div>
    </div>
    
    <div class="content">
      <div class="welcome-section">
        <h2>欢迎来到齐大图书商城</h2>
        <p>请登录或注册以开始使用</p>
      </div>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { useRouter } from 'vue-router'

const router = useRouter()

const goToLogin = () => {
  router.push('/login')
}

const goToRegister = () => {
  router.push('/register')
}

const goToCenter = () => {
  router.push('/center')
}
</script>

<style scoped>
.home {
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.header {
  background: white;
  padding: 20px 40px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.title {
  color: #2c3e50;
  font-size: 24px;
  font-weight: bold;
  margin: 0;
}

.nav-buttons {
  display: flex;
  gap: 10px;
}

.content {
  padding: 40px;
  text-align: center;
}

.welcome-section {
  max-width: 600px;
  margin: 0 auto;
  padding: 60px 20px;
}

.welcome-section h2 {
  color: #2c3e50;
  font-size: 32px;
  margin-bottom: 20px;
}

.welcome-section p {
  color: #7f8c8d;
  font-size: 18px;
  margin: 0;
}
</style>
